package com.pjedu.ssmdemo.service.serviceImp;


import com.pjedu.ssmdemo.entity.User;
import com.pjedu.ssmdemo.mapper.UserDao;
import com.pjedu.ssmdemo.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 汪洋
 * @Description TODO
 */
@Service("userService")
public class UserServiceImp implements UserService {
    @Resource
    private UserDao userDao;

    @Override
    public List<User> findAll(){
        return userDao.findAll();
    }

    @Override
    public User findById(Integer userId){
        return userDao.findById(userId);
    }

    @Override
    public void updateUser(User user){
        userDao.updateUser(user);
    }

    @Override
    public User login(User user){
        return userDao.login(user);
    }

}
